package com.example.dao;

import com.example.entity.Account;
import com.example.entity.SigninusersInfo;
import com.example.vo.SigninusersInfoVo;
import com.example.vo.YonghuVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface SigninusersInfoDao extends Mapper<SigninusersInfo> {
    List<SigninusersInfoVo> findByNames(@Param("names") String names);
	
	List<SigninusersInfo> findByUsername(@Param("username") String username);
    int checkRepeat(@Param("column") String column, @Param("value") String value, @Param("id") Long id);
    
    Integer count();
	
	@Select("select * from signinusers_info where username = #{username}")
    SigninusersInfo selectByUsername(String username);
	
	@Select("SELECT * FROM signinusers_info order by id")
    List<Map<String, Object>> daochuexcel();
	
	@Select("SELECT xxdiquziduanxxxx,count(id) as hsggs FROM signinusers_info  group by xxdiquziduanxxxx")
    List<Map<String,String>> findByDiqu();
	
	
	
	@Select("SELECT distinct(gender) as aa,count(id) as bb FROM signinusers_info group by gender order by id")
List<Map<String, Object>> signinusers_tj_gender();
@Select("SELECT distinct(age) as aa,count(id) as bb FROM signinusers_info group by age order by id")
List<Map<String, Object>> signinusers_tj_age();


	
    
	
	SigninusersInfoVo findByUsernamezj(String username);
	
	@Select("select * from signinusers_info where pwd = #{code} and username = #{name}")
Account selectBySigninusersInfo(YonghuVo user);
	
	

}
